The HDF_DFAN_LABLIST function retrieves a list of the reference numbers and the corresponding labels for a given tag in an HDF file.
Result = HDF_DFAN_LABLIST( Filename, Tag, Reflist, Labellist [, LISTSIZE=value] [, MAXLABEL=value] [, STARTPOS=value] [, /STRING] )
If successful, the number of entries found is returned.
A scalar string containing the name of the file to be read.
The tag number.
A named variable in which an array of reference numbers associated with the given tag is returned.
A named variable in which an array of labels is returned. Unless the STRING keyword is set, Labellist will contain an N_ELEMENTS(Reflist) by MAXLABEL array of bytes. Note that array elements containing labels that are shorter than MAXLABEL will be padded with zeroes.
Set the maximum size of the Reflist and Labellist returned. The default is to read all references present, or 20 if the inquiry to obtain the number of references fails.
Use this keyword to override the default label length of 16.
Use this keyword to set the default starting position in the Reflist array.
Set this keyword to return an array of strings rather than an array of bytes. If STRING is set, the MAXLABEL keyword is ignored and full-length strings are returned.
tag_image = 302
file = 'DEMOlablist.hdf'
n_images = HDF_DFAN_LABLIST(file, tag_image, refs, list, /STRING)
help, n_images, refs, list
PRINT, list(0)
; Find all the compressed images:
tag_image_comp = 303
n_comp_images = HDF_DFAN_LABLIST(file, tag_image_comp, $
refs, list, MAXLABEL=5)
HELP, n_comp_images, refs, list
N_IMAGES LONG = 2
REFS INT = Array(2)
LIST STRING = Array(2)
SAMPLE IMAGE LABEL
N_COMP_IMAGES LONG = 3
REFS INT = Array(3)
LIST BYTE = Array(5, 3)
4.0 |
Introduced |